qrisp.perm_unlock#
- perm_unlock(qubits)[source]#
Reverses the effect of “perm_lock”.
- Parameters:
- qubitslist[Qubit] or QuantumVariable
The qubits to phase-tolerantly unlock.
Examples
We create a QuantumChar, perm-lock it’s Qubits and attempt to initialize.
>>> from qrisp import QuantumChar, perm_lock, perm_unlock >>> q_ch = QuantumChar() >>> perm_lock(q_ch, message = "Qubits are perm-locked due to testing purposes") >>> q_ch[:] = "g" Exception: Qubits are perm-locked due to testing purposes
>>> perm_unlock(q_ch) >>> q_ch[:] = "g" >>> print(q_ch) {'g': 1.0}